<template>
  <div class="siteAside-container">
    <template v-if="data">
      <Avatar :url="data.avatar" />
      <h1 class="title">{{ data.siteTitle }}</h1>
    </template>
    <Menu v-if="data" />
    <Contact v-if="data" />
    <p v-if="data" class="record">{{ data.icp }}</p>
  </div>
</template>

<script>
import { mapState } from "vuex";
import "@/styles/global.less";
import Avatar from "../Avatar/index.vue";
import Contact from "./Contact/index.vue";
import Menu from "./Menu/index.vue";
export default {
  components: {
    Avatar,
    Contact,
    Menu,
  },
  computed: {
    ...mapState("setting", ["loading", "data"]),
  },
  created() {
    this.$store.dispatch("setting/fetchData");
  },
};
</script>

<style lang="less" scoped>
@import "~@/styles/var.less";
.siteAside-container {
  width: 100%;
  height: 100%;
  background: @dark;
  padding: 20px 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  &::-webkit-scrollbar {
    display: none;
  }

  .title {
    font-size: 1.2em;
    color: #fff;
    text-align: center;
  }
  .avatar-container {
    margin: 0 auto;
  }
  p {
    text-align: center;
    font-size: 12px;
  }
}
</style>